#读文件apitest.sql,打印所有行数据
file=open('apitest.sql','r',encoding='utf-8')
# for row in file:
#     print(row,end='')
for row in file:
    if row.strip() and not row.startswith('--'):
        print(row,end='')
# startswitch strip
#过滤注释行和空行-提取有效sql语句